//
//  NotesTableViewCell.m
//  Funny
//
//  Created by dllo on 15/10/30.
//  Copyright © 2015年 King. All rights reserved.
//

#import "NotesTableViewCell.h"

@implementation NotesTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.imgView = [[UIImageView alloc]init];
        [self.contentView addSubview:self.imgView];
        
        self.foot = [[UIImageView alloc]init];
        [self.contentView addSubview:self.foot];
        
        self.userView = [[UIImageView alloc]init];
        [self.contentView addSubview:self.userView];
        self.userView.layer.masksToBounds = YES;
        self.userView.layer.cornerRadius = 30*H;
        
        self.username = [[UILabel alloc]init];
        [self.contentView addSubview:self.username];
        self.username.textColor = [UIColor grayColor];
        self.username.font = [UIFont systemFontOfSize:14];
        
        self.titleLabel = [[UILabel alloc]init];
        [self.contentView addSubview:self.titleLabel];
        
        self.countView= [[UIImageView alloc]init];
        [self.contentView addSubview:self.countView];
        self.countView.backgroundColor = [UIColor blackColor];
        self.countView.alpha = 0.7;
        self.countView.layer.masksToBounds = YES;
        self.countView.layer.cornerRadius = 5;
        
        self.countLabel = [[UILabel alloc]init];
        [self.countView addSubview:self.countLabel];
        self.countLabel.textAlignment = NSTextAlignmentCenter;
        self.countLabel.font = [UIFont systemFontOfSize:28];
        self.countLabel.textColor = [UIColor whiteColor];
        
        self.label1 = [[UILabel alloc]init];
        [self.countView addSubview:self.label1];
        self.label1.textAlignment = NSTextAlignmentCenter;
        self.label1.font = [UIFont systemFontOfSize:12];
        self.label1.textColor = [UIColor whiteColor];
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    self.imgView.frame = CGRectMake(0, 0, SelfWidth, 190*H);
    self.foot.frame = CGRectMake(0, 120*H, SelfWidth, 70*H);
    self.userView.frame = CGRectMake(30*W, 160*H, 60*H, 60*H);
    self.countView.frame = CGRectMake(300*W, 15*H, 50*W, 65*H);
    self.countLabel.frame = CGRectMake(5*W, 0, 45*W, 45*H);
    self.label1.frame = CGRectMake(0, 40*H, 50*W, 20*H);
    self.username.frame = CGRectMake(100*W, 190*H, 300*W, 30*H);
    self.titleLabel.frame = CGRectMake(30*W, 220*H, 300*W, 40*H);
    
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
